<?php
/* Generieke definitie file */
include_once 'includes/defs/constants.php';
include_once 'includes/classes/datum.php';
error_reporting(0);
require ('includes/connect.php');




?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/xhtml" lang="nl">
<head>
<title>M in Events - Eigen rooster</title>

<LINK rel="stylesheet" href="includes/mystyle.css" type="text/css" /> 

<link rel="icon" href="images/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" />
<link rel="favicon" href="images/favicon.ico" type="image/x-icon" />

</head>

<body>
<div id="wrapper">
    
	<div id="circle">
		<div id="header">
			<div id="header-left">
				<div id="koptekst">
					Rooster
				</div>
			</div>
			<div id="header-right">
				<a href="optie.php"><img src="images/instellingen.png" border="0"></a>
				<img src="images/faq.png" />
				<img src="images/uitloggen.png" />
				<div id="naam">
					<p style="font-size: 14px;">Ingelogd als:</br></p>
					<p style="font-size: 26px;"><b>Tim van den Elsen</b></br></p>
				</div>
			</div>
		</div>
		<div id="content-wrapper">
			<div id="menu-left">
				<div id="menu-left-content">
					<a href="http://127.0.0.1/minevents/" style="text-decoration: none" >
					<img src="../images/home_button.png"> </a>
				</div>
			</div>
		<div id="menu-right1">
				<div id="menu-rooster">
					<img src="images/menu_button.png"/>
				</div>
				<div id="menu-afdeling">
					<img src="images/menu_button.png"/>
				</div>
                            
                            <div id="menu-afdeling">
					<img src="images/menu_button.png"/>
                                        
				</div>
				
			</div>
			<div id="menu-right2">
				<div id="menu-rooster-text">
					<a href="rooster.php" style="text-decoration: none" >
					Rooster aanmaken </a>
				</div>
				
				<div id="menu-wijzigen-text">
				<a href="overzicht.php" style="text-decoration: none" >
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Overzicht </a>
				</div>
                            
                            <div id="menu-bekijken-text">
					<a href="rooster_l.php" style="text-decoration: none" >
					Rooster bekijken </a>
				</div>
                            
                            
			</div>
			<div id="content">
				<div id="content-koptekst">
					<b> Instellingen </b>
				</div>
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                           
                            <?php //if($_GET['next'] == 1 ){ echo  active; } ?>
				<div id="content01">
					<table border="0" cellspacing="5" cellpadding="2">
                                            
                           
				
    
					
					</table>
				</div>
				<div id="content02">
				
                                   
                                    
                                      <script src="http://cdn.jquerytools.org/1.2.7/full/jquery.tools.min.js"></script>
                                  <script>
  // execute your scripts when the DOM is ready. this is a good habit
  $(function() {

        // select all desired input fields and attach tooltips to them
      $("#myform :input").tooltip({

      // place tooltip on the right edge
      position: "center right",

      // a little tweaking of the position
      offset: [-2, 10],

      // use the built-in fadeIn/fadeOut effect
      effect: "fade",

      // custom opacity setting
      opacity: 0.7

      });
    });
</script>
                                      <script language="JavaScript">
function formulierTest(formulierVeld){
//Geef hier de naam in van de verplichte velden, zoals in je formulier:
var verplichtVeld = Array("afdeling");
//Geef hier de naam in die moet verschijnen in het alert-venster:
var veldBeschrijving = Array("Naam afdeling");
//Geef hier het bericht in:
var alertBoodschap = "Je bent het volgende vergeten in te vullen:\n";
	
//Hieronder niets wijzigen:
var Boodschap = alertBoodschap.length;
for (var i = 0; i < verplichtVeld.length; i++){var obj = formulierVeld.elements[verplichtVeld[i]];if (obj){switch(obj.type){case "select-one":
if (obj.selectedIndex == -1 || obj.options[obj.selectedIndex].text == ""){alertBoodschap += "-" + veldBeschrijving[i] + "\n";}break;case "select-multiple":
if (obj.selectedIndex == -1){alertBoodschap += " - " + veldBeschrijving[i] + "\n";}break;
case "text":case "textarea":if (obj.value == "" || obj.value == null){alertBoodschap += " - " + veldBeschrijving[i] + "\n";}break;default:
if (obj.value == "" || obj.value == null){alertBoodschap += " - " + veldBeschrijving[i] + "\n";}}}}
if (alertBoodschap.length == Boodschap){return true;}else{alert(alertBoodschap);return false; }}
</script>
                                   
       

	<script src="/js/jquery.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript" charset="utf-8">
		$(function () {
			var tabContainers = $('div.tabs > div');
			tabContainers.hide().filter(':first').show();
			
			$('div.tabs ul.tabNavigation a').click(function () {
				tabContainers.hide();
				tabContainers.filter(this.hash).show();
				$('div.tabs ul.tabNavigation a').removeClass('selected');
				$(this).addClass('selected');
				return false;
			}).filter(':first').click();
		});
	</script>
</head>
                           <body id="page">

            <a href="afdeling.php">Afdeling toevoegen</a>
           
       <br /><br />
            <b>Alle afdelingen bekijken</b><br />
            <table>
                                         <?php
	$query = "SELECT * FROM afdeling ORDER BY afdeling_naam ASC";
	$result = mysql_query($query) or die(mysql_error());
	
	while ($loop = mysql_fetch_assoc($result)) 
	{ 
        $afdeling_id = $loop['afdeling_id'];
	$afdeling_naam = $loop['afdeling_naam'];

        
	$aantal = mysql_num_rows($result);

	
		if ($aantal == '0') {
		echo "Er staat niets in de database";
		} else 	{
?>
             
                 
                      <tr>
                      <td><?php echo $loop['afdeling_naam'];?></td>
                      <td><a href="?del=1&id=<?php echo $loop['afdeling_id'];?>"><img src="../images/delete.png" border="0" /></a></td>
                      </tr>

                    <?php
                }
        }
                    ?>
            </table>
            
           
        </div>

    </div>
	<div class="waste"></div>
  </body>             
                                        </div>
                              
               
                      
                                  
				</div>
			</div>
		</div>
		<div id="footer">
			Realisatie: Stichting Innovision Solutions
		</div>
	</div>
</div>
</body>
</html>